Repository navigation
Slim more agent output, fix spending report dates, add an output size benchmark - #9
Merged
Merged
Conversation
Measured against the 3.10.0 server image with 2 accounts, 8 assets and ~100 activities: - holdings: one flat row per holding, base-currency values, nulls left out (9.8 KB -> 3.4 KB). --full keeps the server rows. - budget: computed rows only, without ids, colours and empty categories (13.7 KB -> 0.8 KB with no budget set up). - spending report: byDay and byDayByCategory only with --full. - health: also drops routes, translation keys, cache keys and the fix payload (8.4 KB -> 5.6 KB). - rebalance: category colours only with --full. - --wait: failed_syncs messages lose the provider URL (2.7 KB -> 1.3 KB). - Global --fields a,b.c projects each row, wf call included. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0178eJr8TT5NezDCgT1yLgZp
The server parses startDate and endDate as RFC 3339 instants. With no account opted into spending it returns zeros before parsing, so a bare YYYY-MM-DD passed the integration test; once an account is tracked the report failed with "premature end of input" (500). Send the first and last millisecond of each day in the app's timezone, as the web app does (zonedCalendarDateBoundaryToDate). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0178eJr8TT5NezDCgT1yLgZp
scripts/bench-seed.sh fills a fresh test server with a fixed data set (3 accounts, 8 stocks, ~120 activities, a month of categorised spending with budget targets). scripts/bench.sh prints a Markdown table of each read command's output size, and with a git ref builds that ref in a temporary worktree and compares. test-server.sh: WF_TEST_PROXY=1 passes HTTPS_PROXY (and WF_TEST_CA_BUNDLE) to the server, so quote syncs work in sandboxes whose outbound traffic goes through a proxy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0178eJr8TT5NezDCgT1yLgZp
…ards
- spending report: the default --to is today in the app's timezone, so
it names the same day as the boundaries sent to the server.
- appTimezone(client) in context.ts serves spending report and
health --refresh.
- --fields with an empty list exits 2 instead of printing {} rows.
- --fields reads only a row's own properties, not inherited ones such as
constructor or __proto__.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0178eJr8TT5NezDCgT1yLgZp
execute_health_fix needs the action's payload; an {id, label} stub
looked usable but would run the fix with nothing to act on.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0178eJr8TT5NezDCgT1yLgZp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--fieldswf holdings: one flat row per holding (assetId,symbol,quantity,price, and values and gains in the base currency). For a foreign-currency holding it addsfxRateandmarketValueLocal. Nulls are left out.--fullreturns the server rows unchanged.wf budget: only the computed totals, groups and categories, without ids, colours or empty categories.--fullreturns{state, computed}.wf spending report: leaves outbyDayandbyDayByCategoryunless--full.wf health: also leaves out routes, translation keys and cache keys.fixActionstays whole, becauseexecute_health_fixneeds its payload.wf rebalance: leaves out category colours unless--full.--wait: removes the provider request URL from eachfailed_syncsmessage.--fields a,b.c: keeps only those fields of each row, on every command,wf callincluded. An empty list exits 2.wf spending reportdates. The server parsesstartDate/endDateas RFC 3339. A bareYYYY-MM-DDfails with a 500 ("premature end of input") as soon as an account is tracked for spending. The CLI now sends the first and last millisecond of each day in the app's timezone, the same way the web app does (zonedCalendarDateBoundaryToDate). The default--tois also today in the app's timezone.appTimezone(client)is shared withwf health --refresh.scripts/bench-seed.shseeds a fixed data set: 3 accounts, 8 stocks, about 120 activities, and a month of categorised spending with budget targets.scripts/bench.sh [ref]prints a Markdown table of output sizes. Given a git ref, it compares this build with that ref.scripts/test-server.shgetsWF_TEST_PROXY=1/WF_TEST_CA_BUNDLE, so quote syncs work behind a proxy.Measured (
scripts/bench.sh 10b3395, real Yahoo prices)holdingsholdings --accountbudgetspending reporthealthfixActionwas restored; a little more now)Breaking changes
These change the default output of
holdingsandbudget. Scripts that readinstrument.symbolorstateneed--full. I suggest releasing this as 0.4.0. The version is not bumped in this PR.Test plan
pnpm lint && pnpm format:check && pnpm typecheck && pnpm test(159 passed)WF_TEST_REFRESH=1 pnpm test:integrationagainst the 3.10.0 image (13 passed), with the defaulttest-server.sh(no proxy). Not run again after the review-fix commits; CI runs it.scripts/bench-seed.sh+scripts/bench.sh 10b3395against a fresh server with the proxy🤖 Generated with Claude Code
https://claude.ai/code/session_0178eJr8TT5NezDCgT1yLgZp